# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=incidenceeditor
pkgver=20.04.3
pkgrel=0
pkgdesc="KDE PIM incidence editor"
arch="all !ppc64le !s390x !armhf !mips !mips64" # Limited by kmailtransport -> libkgapi -> qt5-qtwebengine
url="https://kontact.kde.org/"
license="LGPL-2.0-or-later AND GPL-2.0-or-later"
depends_dev="qt5-qtbase-dev akonadi-dev ki18n-dev kiconthemes-dev kio-dev kmime-dev akonadi-mime-dev kldap-dev kcodecs-dev calendarsupport-dev eventviews-dev libkdepim-dev kdepim-apps-libs-dev kcalutils-dev kcalendarcore-dev kmailtransport-dev kdiagram-dev"
makedepends="$depends_dev extra-cmake-modules"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/incidenceeditor-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="42ec71587a14e6840932962ced3c1ac36b00218d94cd1c857ccb9fc0d0c13a12580a87e2e2a5fc5f7832c8190bee955d6c5372c9d3cdf8f92bd9a45a5c8d465c  incidenceeditor-20.04.3.tar.xz"
